<template>
    <div>
        <h1>登录</h1>

<el-input v-model="name" placeholder="请输入内容"></el-input>
<el-input v-model="password" placeholder="请输入内容"></el-input>
<el-button v-on:click="longin">默认按钮</el-button>

        
    </div>
</template>

<script>
import axios from 'axios';

export default {

    data () {
        return {
          name:"",
            password:""
        }
    },

    methods: {
       longin(){
           alert("denglu");

            axios.post("http://192.168.111.174:8089/loginnew/login/"+this.name+"/" +this.password)
          .then(res=>{
           let userinfo =  res.data.data;
          alert( userinfo.code );
           // console.log(userinfo);

            alert("345");
          

          })

       } 
    },
    setup() {
        
    },
}
</script>

